[IA64] Fix fetch code method when FP fault occurs @VTi side
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 24 Jul 2006 19:48:12 +0000 (13:48 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 24 Jul 2006 19:48:12 +0000 (13:48 -0600)
This patch intends to use __vmx_get_domain_bundle to fetch code
when FP fault @VTi side.

Singed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
xen/arch/ia64/vmx/mmio.c
xen/arch/ia64/xen/faults.c
xen/arch/ia64/xen/privop.c
xen/arch/ia64/xen/vcpu.c
xen/include/asm-ia64/bundle.h

index 01950bc7f65ccb59d4b4f27a4acbd451284a756f..8890f5052397b969caa1af4f5d70616c49fadc4b 100644 (file)
@@ -421,7 +421,6 @@ static void write_ipi (VCPU *vcpu, uint64_t addr, uint64_t value)
    dir 1: read 0:write
     inst_type 0:integer 1:floating point
  */
-extern IA64_BUNDLE __vmx_get_domain_bundle(u64 iip);
 #define SL_INTEGER  0        // store/load interger
 #define SL_FLOATING    1       // store/load floating
 
index b30470e6ab3a320546a945b280da456b1bfb3784..78cbeb035b3621593534ecb96af466f1e4b32514 100644 (file)
@@ -314,7 +314,6 @@ handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr)
 {
        struct vcpu *v = current;
        IA64_BUNDLE bundle;
-       IA64_BUNDLE __get_domain_bundle(UINT64);
        unsigned long fault_ip;
        fpswa_ret_t ret;
 
@@ -325,7 +324,12 @@ handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr)
         */
        if (!fp_fault && (ia64_psr(regs)->ri == 0))
                fault_ip -= 16;
-       bundle = __get_domain_bundle(fault_ip);
+
+       if (VMX_DOMAIN(current))
+               bundle = __vmx_get_domain_bundle(fault_ip);
+       else 
+               bundle = __get_domain_bundle(fault_ip);
+
        if (!bundle.i64[0] && !bundle.i64[1]) {
                printk("%s: floating-point bundle at 0x%lx not mapped\n",
                       __FUNCTION__, fault_ip);
index cb216ecbee422549b3b6bafbfb0f7cc7f4bbc056..e0e25ab49a45fc1b9fa68a994632c9feb1dad967 100644 (file)
@@ -507,7 +507,6 @@ static IA64FAULT
 priv_handle_op(VCPU *vcpu, REGS *regs, int privlvl)
 {
        IA64_BUNDLE bundle;
-       IA64_BUNDLE __get_domain_bundle(UINT64);
        int slot;
        IA64_SLOT_TYPE slot_type;
        INST64 inst;
index c3d0fe2543bfe4d5512fb5b9791f9d070f646844..9ccb13f2ea28271477e50d572e743ef716242280 100644 (file)
@@ -31,7 +31,6 @@ extern void getfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_
 extern void setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs);
 
 extern void panic_domain(struct pt_regs *, const char *, ...);
-extern IA64_BUNDLE __get_domain_bundle(UINT64);
 
 typedef        union {
        struct ia64_psr ia64_psr;
index 531a4aa9ebe623c1ef5df177e0b162ee99030090..a2e44a4852978007cffb0e78dbb0329f6b881bed 100644 (file)
@@ -223,6 +223,9 @@ typedef union U_INST64 {
     INST64_M47 M47;    // purge translation entry
 } INST64;
 
+extern IA64_BUNDLE __vmx_get_domain_bundle(unsigned long iip);
+extern IA64_BUNDLE __get_domain_bundle(unsigned long iip);
+
 #define MASK_41 ((unsigned long)0x1ffffffffff)
 
 #endif /* _XEN_IA64_BUNDLE_H */